
<div class="row">
    <div class="col-sm-12">
        <div class="form-group">
            <input [formControl]="titleFilter" type="text" class="form-control" placeholder="请输入商品名称">
        </div>
    </div>
</div>

<div *ngFor="let item of products | filterSearch:'title':keyword" class="col-md-4 col-lg-4 col-sm-4">
    <div class="thumbnail">
        <img src="http://placehold.it/320x150" alt="">
        <div class="caption">
            <h4 class="pull-right">{{item.price}}元</h4>
            <h4><a [routerLink]="['/product',item.id]">{{item.title}}</a></h4>
            <p>{{item.desc}}</p>
        </div>
        <div>
            <app-stars [rating]='item.rating'></app-stars>
        </div>
    </div>
</div>